﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class BidingItemInfo : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ////示例
        //this.setPicturePath("~/images/Logo.png");
        //this.Name = "可口可乐";
        //this.MaxBidPrice = "1000$";
        //this.MyBidPrice = "999$";
        //this.LeftTime = "4天";
        //this.BidTime = "两天前";
    }
    //设置商品图片路径
    public void setPicturePath(String path)
    {
        imageButton.ImageUrl = path;// "~/images/Logo.png";
    }
    //商品显示的名称
    public string Name
    {
        get { return name.Text; }
        set { name.Text = value; }
    }
    //最高的竞标价格
    public string MaxBidPrice
    {
        get { return bidPrice.Text; }
        set { bidPrice.Text = value; }
    }
    //我投标的价格
    public string MyBidPrice
    {
        get { return myBidingPrice.Text; }
        set { myBidingPrice.Text = value;}
    }
    //竞拍剩余时间
    public string LeftTime
    {
        get { return leftTime.Text; }
        set { leftTime.Text = value; }
    }
    //我上次投标的时间，可以显示具体的时刻，也可以显示距今的时间间隔
    public string BidTime
    {
        get { return bidTime.Text; }
        set { bidTime.Text = value; }
    }
    public string Link
    {
        set { imageButton.PostBackUrl = value; }
    }
    // ImageButtonClick事件处理函数类型
    public delegate void ButtonClickHandler(object sender, EventArgs e);
    // ImageButtonClick事件
    public event ButtonClickHandler imageButtonClick;
    protected void imageButton_Click(object sender, ImageClickEventArgs e)
    {
        //imageButtonClick(this, e);
    }
}